package kcn.ip21.utils;

import java.lang.reflect.InvocationTargetException;

import kcn.ip21.model.Dutys6;
import kcn.ip21.model.Ip21s6;

public class main1 {
	private String ss="reflection test";
	public static void main(String args[]){
//		Dutys6 dt6=new Dutys6();
//		dt6.setCementtype("jj");
//		new DbService().save(dt6);
//		System.out.println(Ip21s6.class.getClass().getDeclaredFields().length);
//		Ip21s6 s6=new Ip21s6();
//		Dutys6 d6=new Dutys6();
//		s6.setId(2323);
//		for(int i=0;i<s6.getClass().getDeclaredFields().length;i++)
//		{
//			System.out.println(s6.getClass().getDeclaredFields()[i].getName());
//			System.out.println(d6.getClass().getDeclaredFields()[i].getName());
//		}		
//		
		main1 m1=new main1();
		Class[] parameterType=new Class[1];
		parameterType[0]=String.class;
		String arg="这是我的";
		try {
			m1.getClass().getMethod("putString",parameterType).invoke(m1, arg);
		} catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public void putString(String ss){
		System.out.println(ss);
		
	}
}
